package com.service.impl;

import com.dao.UserRescourceDao;
import com.entity.UserRescource;
import com.exception.ServiceException;
import com.service.UserResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * date:2021/4/29
 * description:
 * Author:Stargazer
 */
@Service
public class UserResourceServiceImpl implements UserResourceService{
    @Autowired
    private UserRescourceDao userRescourceDao;

    //将购买的资源加入到用户资源表
    @Override
    public Boolean addMyResources(UserRescource userResource) throws ServiceException {
        int result = userRescourceDao.insertMyResources(userResource);
        return result>0?true:false;
    }
}
